<?xml version="1.0" encoding="utf-8"?>
<!-- 

Copyright 2008 PivDev

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. 
-->
<xs:schema id="config" targetNamespace="http://tempuri.org/config.xsd" elementFormDefault="qualified" xmlns:Pref="http://tempuri.org/config.xsd" xmlns:mstns="http://tempuri.org/config.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType name="BasicPreferences">
    <xs:sequence>
      <xs:element name="Prefix" type="xs:string" minOccurs="0" />
      <xs:element name="Region" type="xs:string" minOccurs="0" />
      <xs:element name="Capitalise" type="xs:boolean" default="false" maxOccurs="1" minOccurs="0" />
      <xs:element name="Suffix" type="xs:string" minOccurs="0" />
      <xs:element name="PrefixRemove" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Prefix" type="xs:string" maxOccurs="unbounded" minOccurs="1" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Table">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="Name" type="xs:string" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubClass">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
      <xs:element name="Prefix" type="xs:string" minOccurs="0" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Field">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="SubClass" type="Pref:SubClass" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Query">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="SubClass" type="Pref:SubClass" maxOccurs="1" />
          <xs:element name="ReplaceChars" minOccurs="0" type="Pref:ReplaceChars" nillable="true">
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Preferences">
    <xs:complexType>
      <xs:all>
        <xs:element name="Table" type="Pref:Table" minOccurs="0" />
        <xs:element name="Query" type="Pref:Query" minOccurs="0" />
        <xs:element name="Field" type="Pref:Field" minOccurs="0" />
        <xs:element name="DataBuild" type="Pref:DataBuild" minOccurs="0" />
        <xs:element name="FormScriptBuild" type="Pref:FormScriptBuild" minOccurs="0" />
        <xs:element name="Form" type="Pref:Form" minOccurs="0" />
        <xs:element name="Tab" type="Pref:Tab" minOccurs="0" />
        <xs:element name="Segment" type="Pref:Segment" minOccurs="0" />
        <xs:element name="DiscFormField" type="Pref:DiscFormField" minOccurs="0" />
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="BaseBuild">
    <xs:sequence>
      <xs:element name="ClassInherits" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Inherits" type="xs:string" maxOccurs="unbounded" minOccurs="1" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Namespaces" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Namespace" type="xs:string" maxOccurs="unbounded" minOccurs="1" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Usings" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Using" type="xs:string" maxOccurs="unbounded" minOccurs="1" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Methods" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Method" minOccurs="1" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="code" type="xs:string" minOccurs="1" />
                </xs:sequence>
                <xs:attribute name="constructor" type="xs:boolean" />
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="region" type="xs:string" />
        </xs:complexType>
      </xs:element>
      <xs:element name="Variables" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Variable" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Prefix" type="xs:string" minOccurs="0">
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DataBuild">
    <xs:complexContent>
      <xs:extension base="Pref:BaseBuild">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FormScriptBuild">
    <xs:complexContent>
      <xs:extension base="Pref:BaseBuild">
        <xs:sequence>
          <xs:element name="ImpMethods" minOccurs="0">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Region" type="xs:string" minOccurs="0" />
                <xs:element name="AddForm" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="DeleteForm" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="Execute" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="LoadForm" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="NewForm" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="NewSecondary" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="SaveForm" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="SetSystem" type="Pref:FSMethod" minOccurs="0" />
                <xs:element name="Prefix" type="xs:string" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="FSMethod">
    <xs:sequence>
      <xs:element name="Prefix" type="xs:string" minOccurs="0" />
      <xs:choice minOccurs="1">
        <xs:element name="Code" type="xs:string" />
        <xs:element name="UseDefault" type="xs:boolean" />
      </xs:choice>
    </xs:sequence>
    <xs:attribute name="UseTryCatch" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="Form">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="ReplaceChars" type="Pref:ReplaceChars" maxOccurs="1" minOccurs="0" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DiscFormField">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="SubClass" type="Pref:SubClass" minOccurs="0" maxOccurs="1" nillable="true" />
          <xs:element name="Unique" type="xs:boolean" default="true" nillable="true" />
          <xs:element name="ReplaceChars" type="Pref:ReplaceChars" nillable="true" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Tab">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="ReplaceChars" type="Pref:ReplaceChars" nillable="true" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Segment">
    <xs:complexContent>
      <xs:extension base="Pref:BasicPreferences">
        <xs:sequence>
          <xs:element name="ReplaceChars" type="Pref:ReplaceChars" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ReplaceChars">
    <xs:sequence>
      <xs:element name="Char" type="xs:string" maxOccurs="unbounded" minOccurs="0" />
      <xs:element name="ReplaceWith" type="xs:string" />
      <xs:element name="RemoveWithCharsEnd" type="xs:boolean" />
      <xs:element name="RemoveWithCharsStart" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>